﻿

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZF.BLL;
namespace ZF.WS.UserControls.Index
{
    public partial class fz : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            using (var dc = SiteInfo.CreateDBDataContext())
            {
                var xylist = dc.G_Wishing
               .Join(dc.US_Member, p => p.MemberId, m => m.MemberId, (p, m) => new
               {
                   Wishing = p,
                   Name = m.Account,
                   Msg = p.Content,
               }).OrderByDescending(p => p.Wishing.WishingId).Take(10).ToList();


                this.lvMsg.DataSource = xylist;
                this.lvMsg.DataBind();

       


            
                var fzList = dc.G_Buddha.OrderByDescending(p=>p.OrderId).Take(2).ToList();
                this.lvFZ.DataSource = fzList;
                this.lvFZ.DataBind();
            }
        }
    }
}